package com.iretailer.report.analyze.device.face.horizon.model;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.OffsetDateTime;

/**
 * @Auther: xjw
 * @Date: 2019/8/6 0006 10:38
 * @Description:
 */
public class Feature {

    private Long timeStamp;

    private LocalDateTime dateTime;

    // 被识别的人的 Id，与抓拍图的 PersonId 对应
    private String PersonId;
    // 人脸特征值 128 位
    private String featureInfo;
    // 被识别的底库照片，Base64 编码
    private String matchedImg;
    private String name;
    // 人脸特征库存中匹配的 ID，与增改 ID 接口中传入的参数 uid 一致
    private String matchedId;
    // 人脸特征匹配相似度
    private Integer matchedRate;
    // 人脸特征数据库 ID
    private String databaseId;
    // 被识别的抓拍照片，Base64 编码
    private String cropImg;

    public LocalDateTime getDateTime() {
        return LocalDateTime.ofEpochSecond(this.getTimeStamp() / 1000, 0, OffsetDateTime.now().getOffset());
    }

    public Long getTimeStamp() {
        return timeStamp;
    }

    public void setTimeStamp(Long timeStamp) {
        this.timeStamp = timeStamp;
    }

    public String getPersonId() {
        return PersonId;
    }

    public void setPersonId(String personId) {
        PersonId = personId;
    }

    public String getFeatureInfo() {
        return featureInfo;
    }

    public void setFeatureInfo(String featureInfo) {
        this.featureInfo = featureInfo;
    }

    public String getMatchedImg() {
        return matchedImg;
    }

    public void setMatchedImg(String matchedImg) {
        this.matchedImg = matchedImg;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getMatchedId() {
        return matchedId;
    }

    public void setMatchedId(String matchedId) {
        this.matchedId = matchedId;
    }

    public Integer getMatchedRate() {
        return matchedRate;
    }

    public void setMatchedRate(Integer matchedRate) {
        this.matchedRate = matchedRate;
    }

    public String getDatabaseId() {
        return databaseId;
    }

    public void setDatabaseId(String databaseId) {
        this.databaseId = databaseId;
    }

    public String getCropImg() {
        return cropImg;
    }

    public void setCropImg(String cropImg) {
        this.cropImg = cropImg;
    }
}
